import { createRouter, createWebHashHistory } from 'vue-router'
import SupermapLayout from "@/layout/index.vue";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '',
      component: SupermapLayout,
      redirect: '',
      children: [
        {
          // 主页面
          path: '',
          name: 'Default',
          meta: {
            title: 'default'
          },
          component: () => import('../views/pages/main/index.vue')
        },
        // 查询分析
        {
          path: '/search',
          name: 'Search',
          meta: {
            title: 'search'
          },
          component: () => import('../views/pages/search/search.vue')
        },
        // 决策分析
        {
          path: '/decision',
          name: 'Decision',
          meta: {
            title: 'decision'
          },
          component: () => import('../views/pages/decision/decision.vue')
        }
      ]
    },

  ]
})

export default router
